const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Shell = imports.gi.Shell;
-const UPowerGlib = imports.gi.UPowerGlib;
const SystemdLoginManagerIface = <interface name='org.freedesktop.login1.Manager'>
<method name='PowerOff'>
this._proxy = new ConsoleKitManager(Gio.DBus.system,
'org.freedesktop.ConsoleKit',
'/org/freedesktop/ConsoleKit/Manager');
- this._upClient = new UPowerGlib.Client();
},
// Having this function is a bit of a hack since the Systemd and ConsoleKit
},
canSuspend: function(asyncCallback) {
- Mainloop.idle_add(Lang.bind(this, function() {
- asyncCallback(this._upClient.get_can_suspend());
- return false;
- }));
+ return false;
},
powerOff: function() {
},
suspend: function() {
- this._upClient.suspend_sync(null);
}
});